package cn.getech.data.development.constant;

import lombok.Getter;

/**
 * 任务类型的枚举
 *
 * @author zenith
 */
@Getter
public enum WorkFlowMenuType {

    ROOT_DIR(0),
    WORKFLOW_MGT(1),
    SUB_DIR(2),
    WORKFLOW_FIELD(3),
    WORKFLOW_MGT_FIELD(4),
    SUB_SUB_DIR(5);
    int code;

    WorkFlowMenuType(int code) {
        this.code = code;
    }
    public static WorkFlowMenuType ObjOf(Integer status) {
        if (status == null) {
            return null;
        } else {
            for (WorkFlowMenuType s : WorkFlowMenuType.values()) {
                if (s.getCode() == status) {
                    return s;
                }
            }
            return null;
        }
    }
}
